<%@page import="java.util.List"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="java.util.ArrayList"%>
<%@ page contentType="text/xml;charset=UTF-8" language="java"%>
<?xml version="1.0" encoding="UTF-8"?>
<% 
String serverUrl = UrlHelper.getServerUrl(request);
List<String> domains = (List<String>) request.getAttribute("domains");
%>
<urlset
      xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
            http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
  <url>
	  <loc><%=serverUrl %>/</loc>
	</url>
	<%
	for(int i = 0; i < domains.size(); i++) {
	%>
	<url>
	  <loc><%=serverUrl %>/domain/<%=domains.get(i) %></loc>
	</url>
	<%
	}
	%>
</urlset>